package com.yc.cloud.portal.controller;

import com.yc.cloud.api.vo.SysApplicationVersionVo;
import com.yc.cloud.basic.api.ResponseResult;
import com.yc.cloud.portal.dto.request.SysApplicationVersionCheckParam;
import com.yc.cloud.portal.service.SysApplicationVersionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.val;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 系统应用版本
 *
 * @author Yancy
 * @date 2024-04-20
 */
@RestController
@RequestMapping("/sys/application/version")
@Api(value = "系统应用版本", tags = "系统应用版本接口")
public class SysApplicationVersionController {

    @Resource
    private SysApplicationVersionService sysApplicationVersionService;


    @GetMapping("check")
    @ApiOperation(value = "系统应用版本检查更新", notes = "根据ID查询")
    public ResponseResult<SysApplicationVersionVo> check(@Validated SysApplicationVersionCheckParam param) {
        val result = sysApplicationVersionService.check(param);
        return ResponseResult.success(result);
    }


}
